<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/common/taglibs.jsp" %>
<script type="text/javascript">
<!--
function exportorderperman(){
	var url = "${ctx }/crm/report/goods-cate-year!export.action";
	var ym = $("#goodscateyearyear").val();
	url+="?";
	url+="year="+ym;
	window.open(url);
	}
//-->
</script>
<form id="pagerForm" method="post" action="${ctx }/crm/report/goods-cate-year.action">
	<input type="hidden" name="status" value="${param.status}">
	<input type="hidden" name="keywords" value="${param.keywords}" />
	<input type="hidden" name="pageNum"  value="${page.pageNo}" />
	<input type="hidden" name="numPerPage" id="numPerPage" value="${page.pageSize}" />
	<input type="hidden" name="orderField" value="${param.orderField}" />
</form>
<div class="page">
	<div class="pageHeader">
		<form id="goodscateyear" onsubmit="return navTabSearch(this);" action="${ctx }/crm/report/goods-cate-year.action" method="post">
		<div class="searchBar">
			<ul class="searchContent">
				<li>
					<label>选择年份：</label>
					<span>
					<input type="text" name="year" id="goodscateyearyear" size="20" value="${year}" onfocus="WdatePicker({el:'goodscateyearyear',dateFmt:'yyyy'})"/>
					</span>
				</li>
			</ul>
			<div class="subBar">
				<ul>
					<li><div class="buttonActive"><div class="buttonContent"><button type="submit"> 检 索 </button></div></div></li>
					<li><div class="buttonActive"><div class="buttonContent"><button type="button" onclick="exportorderperman()"> 导 出 </button></div></div></li>
				</ul>
			</div>
		</div>
		</form>
	</div>
	<div class="pageContent">
		 <div id="chart1div" >
			请按条件查询！
		</div>
		<script language="JavaScript">					
			var chart1 = new FusionCharts(Column3D, "chart1Id", "800", "350", "0", "1");	
			var xml = "<chart caption='${year} 年 产 品 销 量 分 类 统 计' xAxisName='产品名称' yAxisName='销量（台）'";
			xml+=" rotateYAxisName='1' baseFont='宋体' baseFontSize='14' palette='10'";
			xml+=" showBorder='0' exportEnabled='1' exportHandler='"+explorer+"' exportAtClient='0' exportAction='download'";
			xml+=" exportFileName='SoGoodSoft'";
			xml+=" >"
			<s:iterator value="list" var="obj">
			xml+="<set label='${obj[1]}' value='${obj[2]}' />";
			</s:iterator>	
			xml+="</chart>";
			chart1.setDataXML(xml);
			chart1.render("chart1div");
			
		</script>

		
	</div>
</div>